package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotStudentLeaveMapper;
import com.ruoyi.wisdom.domain.IotStudentLeave;
import com.ruoyi.wisdom.service.IIotStudentLeaveService;

/**
 * 请假管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-31
 */
@Service
public class IotStudentLeaveServiceImpl implements IIotStudentLeaveService 
{
    @Autowired
    private IotStudentLeaveMapper iotStudentLeaveMapper;

    /**
     * 查询请假管理
     * 
     * @param id 请假管理主键
     * @return 请假管理
     */
    @Override
    public IotStudentLeave selectIotStudentLeaveById(Long id)
    {
        return iotStudentLeaveMapper.selectIotStudentLeaveById(id);
    }

    /**
     * 查询请假管理列表
     * 
     * @param iotStudentLeave 请假管理
     * @return 请假管理
     */
    @Override
    public List<IotStudentLeave> selectIotStudentLeaveList(IotStudentLeave iotStudentLeave)
    {
        return iotStudentLeaveMapper.selectIotStudentLeaveList(iotStudentLeave);
    }

    /**
     * 新增请假管理
     * 
     * @param iotStudentLeave 请假管理
     * @return 结果
     */
    @Override
    public int insertIotStudentLeave(IotStudentLeave iotStudentLeave)
    {
        iotStudentLeave.setCreateTime(DateUtils.getNowDate());
        return iotStudentLeaveMapper.insertIotStudentLeave(iotStudentLeave);
    }

    /**
     * 修改请假管理
     * 
     * @param iotStudentLeave 请假管理
     * @return 结果
     */
    @Override
    public int updateIotStudentLeave(IotStudentLeave iotStudentLeave)
    {
        iotStudentLeave.setUpdateTime(DateUtils.getNowDate());
        return iotStudentLeaveMapper.updateIotStudentLeave(iotStudentLeave);
    }

    /**
     * 批量删除请假管理
     * 
     * @param ids 需要删除的请假管理主键
     * @return 结果
     */
    @Override
    public int deleteIotStudentLeaveByIds(Long[] ids)
    {
        return iotStudentLeaveMapper.deleteIotStudentLeaveByIds(ids);
    }

    /**
     * 删除请假管理信息
     * 
     * @param id 请假管理主键
     * @return 结果
     */
    @Override
    public int deleteIotStudentLeaveById(Long id)
    {
        return iotStudentLeaveMapper.deleteIotStudentLeaveById(id);
    }
}
